package main

import "fmt"

func main() {
	// 1-100内9的倍数的个数，及和
	var count byte = 0
	var sum int = 0
	for i := 1; i <= 100; i++ {
		if i%9 == 0 {
			count++
			sum += i
		}
	}
	fmt.Printf("count is %d, sum is %d\n", count, sum)

	// format output
	for i, j := 0, 6; i <= 6 && j >= 0; i, j = i+1, j-1 {
		fmt.Printf("%d + %d = %d\n", i, j, i+j)
	}

	i := 0
	j := 6
	for i <= 6 && j >= 0 {
		fmt.Printf("%d + %d = %d\n", i, j, i+j)
		i++
		j--
	}
}
